import java.util.*;

public class _07_CountSubstringOccurrences {
	
	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		String input = in.nextLine();
		String substring = in.nextLine();
		in.close();
		
		int substringCount = 0;
		int index = -1;
		
		do
		{
			index = input.toLowerCase().indexOf(substring.toLowerCase(), index + 1);
			
			if (index >= 0)
			{
				substringCount++;
			}
		}
		while (index >= 0);
		
		System.out.println(substringCount);
	}
}